//
//  TitleButton.m
//  Weibo
//
//  Created by student on 16/4/25.
//  Copyright © 2016年 QiangTech. All rights reserved.
//

#import "TitleButton.h"

@implementation TitleButton
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        [self setImage:[UIImage imageNamed:@"navigationbar_arrow_up"] forState:UIControlStateNormal];
        [self setImage:[UIImage imageNamed:@"navigationbar_arrow_down"] forState:UIControlStateSelected];
        
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    CGRect frame=self.titleLabel.frame;
    frame.origin.x=0;
    self.titleLabel.frame=frame;
    CGRect imageframe=self.imageView.frame;
    imageframe.origin.x=frame.size.width;
    self.imageView.frame=imageframe;
}
@end
